from urllib.request import Request,urlopen
from time import sleep
ur1 = 'https://movie.douban.com/j/chart/top_list?type=11&interval_id=100%3A90&action=&start=0&limit=20'
headers = {
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"
    }
i = 0
base_ur1 = 'https://movie.douban.com/j/chart/top_list?type=11&interval_id=100%3A90&action=&start={}&limit=20'


while True:
    req = Request(base_ur1.format(i*20),headers= headers)
    resp = urlopen(req)
    info = resp.read().decode()
    if info =="[]":
        break
    else:
        i+=1
    print(info)
    sleep(3)